#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>

namespace Ui {
class MainWindow;
}

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    explicit MainWindow(QWidget *parent = 0);
    ~MainWindow();

private:
    int vmap[11][11] = { 0 };
    static const int INF = 0x3f3f3f3f;
    static const int FULL = 262143;

    Ui::MainWindow *ui;
    int chess0 = 0;
    int chess1 = 0;
    int status = 2;
    int turn;
    int a = 0, b = 0;
    int at = 0, bt = 0;
    int whofirst;

    void paintEvent(QPaintEvent * event) override;
    void computerOutput(const char * str);
    void AIInput();
    int alphabeta(int chess, int depth, int alpha, int beta, int move, int a, int b, int & bestMove);
    int alphabetaII(int chess, int depth, int alpha, int beta, int move, int a, int b, int & bestMove);
    int evaluate(int chess, int move, int a, int b);
    int score(int edge, int chess);
    void updateTri(int chess, int edge, int & tri);
    void updateScoreDisplay();

private slots:
    void newGame();
    void newGameWithAIFirst();
    void newGameWithHumanFirst();
    void receiveHumanInput();
    void clearOutput();
};

#endif // MAINWINDOW_H
